﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BT_DoHoa_Nhom13.ShapeLib
{
    public class MyEclipse:MyShape
    {
        public override void Draw(MyGraphic graphic)
        {
            double newLeft = Math.Min(left, right);
            double newTop = Math.Min(top, bottom);
            double newWidth = Math.Abs(right - left);
            double newHeight = Math.Abs(bottom - top);
            graphic.DrawEllipse(newLeft, newTop, newWidth, newHeight);
        }

        public override MyShape Clone()
        {
            return new MyEclipse();
        }
    }
}
